#ifndef _FENGINE_APPLICATION_
#define _FENGINE_APPLICATION_

#include "Node.h"
#include "GUINode.h"

namespace FEngine
{
	/**
	 * Base class containing the logic of the program.
	 */
	class FEApplication : public Node
	{
		public:

			/**
			 * Constructor.
			 */
			FEApplication();
			virtual ~FEApplication();

			virtual void initialize();
			
			/**
			 * Add a GUI element to the scene.
			 * @param _elem GUINode to add.
			 */
			void addGUIElement(GUINode* _GUINode);
			
			/**
			 * Remove a GUI element to the scene.
			 * @param _elem GUINode to remove.
			 */
			void removeGUIElement(GUINode* _GUINode);
			
			/**
			 * Update the logic of the GUINode.
			 * Called every frame.
			 * @param _elpsedTime Time elapsed since the last frame.
			 */
			virtual void updateGUI(double _elapsedTime);

			/**
			 * Send the render data of the GUINode to directX.
			 * Called every frame.
			 * @param _elpsedTime Time elapsed since the last frame.
			 */
			virtual void renderGUI(double _elapsedTime);

			virtual void update(double _elapsedTime);
			virtual void render(double _elapsedTime);


		private:

			GUINode* mParentGUINode;
	};

} // namespace FEngine

#endif
